import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:fluttermarketingplus/routers/jump_receive.dart';
import 'package:fluttermarketingplus/routers/routes.dart';
import 'package:oktoast/oktoast.dart';

//首页面
class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        alignment: Alignment.center,
        child: RaisedButton(
          onPressed: () {
            showToast('添加一个用户');
            JumpReceive().jump(context, Routes.addConsumerPage,
                paramsName: 'data', sendData: '录入客户信息');
          },
          child: Text(
            '添加一个用户',
            style:
                TextStyle(color: Colors.blue, fontSize: ScreenUtil().setSp(30)),
          ),
        ),
      ),
    );
  }
}
